package com.shell.provider;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.shell.governor.access.po.PubAccess;
import com.shell.governor.access.service.PubAccessService;

@RestController
public class PubAccessProvider
{
  @Autowired
  private PubAccessService pubAccessService;
  
  @RequestMapping({"/access/selectByTagCodes"})
  public List<PubAccess> selectByTagCodes(@RequestParam("tagCodes") String tagCodes)
  {
    String[] tagCodeArr = tagCodes.split(",");
    return this.pubAccessService.selectByKeys(tagCodeArr);
  }
}